#ifndef MOTOR_DRIVER
#define MOTOR_DRIVER
#include "include.h"


#define UP                                      1
#define DOWN                                    2
#define STOP                                    3

#define MOTOR_PWM_Dutyfactor_Low                0
#define MOTOR_PWM_Dutyfactor_Medium             500
#define MOTOR_PWM_Dutyfactor_High               1000


void motor_rotate_stop( void );
void control_XYmotor_up( void );
void control_XYmotor_down( void );
void control_XYmotor_stop( void );
void write_rs485_ATMT_two_culumn_motor_value( uint8_t addr, uint8_t function_code, uint16_t reg_addr, uint16_t data, uint8_t size );
void recv_ATMTmotor_driver_package_callback( uint8_t *data, uint16_t size );
void control_motor_move( uint8_t addr, uint8_t type, uint8_t direction );
void control_motor_switch( uint8_t addr, uint8_t type, uint8_t input_status );
void set_ATMTmotor_pwm_dutyfactor( int16_t value );
void recv_ATMT_motor_driver_package_handle( void );
#endif